<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.11.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>cppMISC: iTimer结构体 参考</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<script type="text/javascript" src="../../clipboard.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../cookie.js"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript" src="../../darkmode_toggle.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">cppMISC<span id="projectnumber">&#160;v1.1</span>
   </div>
   <div id="projectbrief">cppMisc 文档系统</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.11.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(1); });
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('../../',true,false,'search.php','搜索',false);
  $(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){ initResizable(false); });
/* @license-end */
</script>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">载入中...</div>
<div class="SRStatus" id="Searching">搜索中...</div>
<div class="SRStatus" id="NoMatches">未找到</div>
</div>
</div>
</div>
</div>

</div><!-- top -->
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-types">Public 类型</a> &#124;
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="../../d8/df6/structi_timer-members.html">所有成员列表</a>  </div>
  <div class="headertitle"><div class="title">iTimer结构体 参考<span class="mlabels"><span class="mlabel">abstract</span></span></div></div>
</div><!--header-->
<div class="contents">

<p>定时器定义接口  
 <a href="#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="../../db/d24/itimer_8hpp_source.html">itimer.hpp</a>&gt;</code></p>
<div class="dynheader">
类 iTimer 继承关系图:</div>
<div class="dyncontent">
<div class="center"><img src="../../dc/d43/structi_timer__inherit__graph.png" border="0" usemap="#ai_timer_inherit__map" alt="Inheritance graph"/></div>
<map name="ai_timer_inherit__map" id="ai_timer_inherit__map">
<area shape="rect" title="定时器定义接口" alt="" coords="198,5,389,299"/>
<area shape="rect" href="../../d9/d91/classlinux_timer.html" title="遵循POSIX标准的TIMER" alt="" coords="5,355,181,835"/>
<area shape="poly" title=" " alt="" coords="212,313,196,348,184,375,179,373,191,346,207,311"/>
<area shape="rect" href="../../db/d3e/classwheels_1_1_c_timer.html" title=" " alt="" coords="205,373,381,816"/>
<area shape="poly" title=" " alt="" coords="296,313,296,373,291,373,291,313"/>
<area shape="rect" href="../../dc/da9/classwin_timer.html" title="针对windows实现的timer" alt="" coords="405,347,605,843"/>
<area shape="poly" title=" " alt="" coords="379,311,396,345,408,371,403,373,391,348,374,313"/>
</map>
</div>
<div class="dynheader">
iTimer 的协作图:</div>
<div class="dyncontent">
<div class="center"><img src="../../d1/dad/structi_timer__coll__graph.png" border="0" usemap="#ai_timer_coll__map" alt="Collaboration graph"/></div>
<map name="ai_timer_coll__map" id="ai_timer_coll__map">
<area shape="rect" title="定时器定义接口" alt="" coords="5,5,196,299"/>
</map>
</div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-types" name="pub-types"></a>
Public 类型</h2></td></tr>
<tr class="memitem:a31bdd3250ca6c5542d0ec156bd82c5ab" id="r_a31bdd3250ca6c5542d0ec156bd82c5ab"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a31bdd3250ca6c5542d0ec156bd82c5ab">emErrCode</a> { <br />
&#160;&#160;<a class="el" href="#a31bdd3250ca6c5542d0ec156bd82c5abaa09563b77a12d14f77018d048ce4d6fb">ERR_CREATE_TIMER</a> = -1000
, <a class="el" href="#a31bdd3250ca6c5542d0ec156bd82c5aba411cbed936ceec95393a481fd39d6cef">ERR_MISSING_INFO_FUN</a>
, <a class="el" href="#a31bdd3250ca6c5542d0ec156bd82c5aba69bdc858844fbe024b1459b4d869e2a7">ERR_START_TIMER</a>
, <a class="el" href="#a31bdd3250ca6c5542d0ec156bd82c5aba9d8d590f2b964254d8190d547b882fde">ERR_STOP_TIMER</a>
, <br />
&#160;&#160;<a class="el" href="#a31bdd3250ca6c5542d0ec156bd82c5aba4033ecbc2c2e7418fd4f2d5e62159d6c">ERR_TICK</a>
, <a class="el" href="#a31bdd3250ca6c5542d0ec156bd82c5aba74f5e1cb5939af592e4e7c06a3406e9e">OK</a> = 0
<br />
 }</td></tr>
<tr class="separator:a31bdd3250ca6c5542d0ec156bd82c5ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a0bd87be9906e599b0776fc592cf81f9c" id="r_a0bd87be9906e599b0776fc592cf81f9c"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="#a31bdd3250ca6c5542d0ec156bd82c5ab">emErrCode</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a0bd87be9906e599b0776fc592cf81f9c">Start</a> (long ms=-1, bool oneShot=false)=0</td></tr>
<tr class="memdesc:a0bd87be9906e599b0776fc592cf81f9c"><td class="mdescLeft">&#160;</td><td class="mdescRight">启动或者重启计时器。  <br /></td></tr>
<tr class="separator:a0bd87be9906e599b0776fc592cf81f9c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa51cbfaef39ee9841c24ff65ce720acc" id="r_aa51cbfaef39ee9841c24ff65ce720acc"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aa51cbfaef39ee9841c24ff65ce720acc">SetOwner</a> (std::function&lt; void()&gt; fun)=0</td></tr>
<tr class="memdesc:aa51cbfaef39ee9841c24ff65ce720acc"><td class="mdescLeft">&#160;</td><td class="mdescRight">指定事件响应函数，  <br /></td></tr>
<tr class="separator:aa51cbfaef39ee9841c24ff65ce720acc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a38cfdd65a88c39d24e2ddc3ceeebda2e" id="r_a38cfdd65a88c39d24e2ddc3ceeebda2e"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="#a31bdd3250ca6c5542d0ec156bd82c5ab">emErrCode</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a38cfdd65a88c39d24e2ddc3ceeebda2e">Stop</a> ()=0</td></tr>
<tr class="memdesc:a38cfdd65a88c39d24e2ddc3ceeebda2e"><td class="mdescLeft">&#160;</td><td class="mdescRight">停止计时器  <br /></td></tr>
<tr class="separator:a38cfdd65a88c39d24e2ddc3ceeebda2e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abea86b75a4bcc2399821b799e221b9ce" id="r_abea86b75a4bcc2399821b799e221b9ce"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#abea86b75a4bcc2399821b799e221b9ce">IsRuning</a> ()=0</td></tr>
<tr class="memdesc:abea86b75a4bcc2399821b799e221b9ce"><td class="mdescLeft">&#160;</td><td class="mdescRight">判断计时器是否正在运行  <br /></td></tr>
<tr class="separator:abea86b75a4bcc2399821b799e221b9ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad51fd07ebb8585928243674cb21e80e0" id="r_ad51fd07ebb8585928243674cb21e80e0"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="#a31bdd3250ca6c5542d0ec156bd82c5ab">emErrCode</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ad51fd07ebb8585928243674cb21e80e0">Reset</a> ()=0</td></tr>
<tr class="memdesc:ad51fd07ebb8585928243674cb21e80e0"><td class="mdescLeft">&#160;</td><td class="mdescRight">复位计时，让计时器从零开始计时  <br /></td></tr>
<tr class="separator:ad51fd07ebb8585928243674cb21e80e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3aaa71906aca3939acf219852b2d36d9" id="r_a3aaa71906aca3939acf219852b2d36d9"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a3aaa71906aca3939acf219852b2d36d9">setTick</a> (long t)=0</td></tr>
<tr class="separator:a3aaa71906aca3939acf219852b2d36d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-static-methods" name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:ae0b9a3f6caa6ae2a56bd06898da25ce1" id="r_ae0b9a3f6caa6ae2a56bd06898da25ce1"><td class="memItemLeft" align="right" valign="top">static std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ae0b9a3f6caa6ae2a56bd06898da25ce1">errMsg</a> (<a class="el" href="#a31bdd3250ca6c5542d0ec156bd82c5ab">emErrCode</a> e)</td></tr>
<tr class="separator:ae0b9a3f6caa6ae2a56bd06898da25ce1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>定时器定义接口 </p>
<dl class="section version"><dt>版本</dt><dd>2.0 </dd></dl>
<dl class="section author"><dt>作者</dt><dd>宋炜 </dd></dl>
<dl class="section date"><dt>日期</dt><dd>2017-2-7 ~ 2021-11-1 2018-03-05 ADD 宋炜 添加计时器复位功能； 使用atomic作为数据操作互斥 2021-11-01 RECODE 宋炜 原来采用sleep方式的计时方式不准确，并且对CPU的占用比较大，重新调整结构 针对不同的操作系统进行独立编写相关代码，以排除上述问题。 </dd></dl>

<p class="definition">在文件 <a class="el" href="../../db/d24/itimer_8hpp_source.html">itimer.hpp</a> 第 <a class="el" href="../../db/d24/itimer_8hpp_source.html#l00014">14</a> 行定义.</p>
</div><h2 class="groupheader">成员枚举类型说明</h2>
<a id="a31bdd3250ca6c5542d0ec156bd82c5ab" name="a31bdd3250ca6c5542d0ec156bd82c5ab"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a31bdd3250ca6c5542d0ec156bd82c5ab">&#9670;&#160;</a></span>emErrCode</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="#a31bdd3250ca6c5542d0ec156bd82c5ab">iTimer::emErrCode</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">枚举值</th></tr><tr><td class="fieldname"><a id="a31bdd3250ca6c5542d0ec156bd82c5abaa09563b77a12d14f77018d048ce4d6fb" name="a31bdd3250ca6c5542d0ec156bd82c5abaa09563b77a12d14f77018d048ce4d6fb"></a>ERR_CREATE_TIMER&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a31bdd3250ca6c5542d0ec156bd82c5aba411cbed936ceec95393a481fd39d6cef" name="a31bdd3250ca6c5542d0ec156bd82c5aba411cbed936ceec95393a481fd39d6cef"></a>ERR_MISSING_INFO_FUN&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a31bdd3250ca6c5542d0ec156bd82c5aba69bdc858844fbe024b1459b4d869e2a7" name="a31bdd3250ca6c5542d0ec156bd82c5aba69bdc858844fbe024b1459b4d869e2a7"></a>ERR_START_TIMER&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a31bdd3250ca6c5542d0ec156bd82c5aba9d8d590f2b964254d8190d547b882fde" name="a31bdd3250ca6c5542d0ec156bd82c5aba9d8d590f2b964254d8190d547b882fde"></a>ERR_STOP_TIMER&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a31bdd3250ca6c5542d0ec156bd82c5aba4033ecbc2c2e7418fd4f2d5e62159d6c" name="a31bdd3250ca6c5542d0ec156bd82c5aba4033ecbc2c2e7418fd4f2d5e62159d6c"></a>ERR_TICK&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a31bdd3250ca6c5542d0ec156bd82c5aba74f5e1cb5939af592e4e7c06a3406e9e" name="a31bdd3250ca6c5542d0ec156bd82c5aba74f5e1cb5939af592e4e7c06a3406e9e"></a>OK&#160;</td><td class="fielddoc"></td></tr>
</table>

<p class="definition">在文件 <a class="el" href="../../db/d24/itimer_8hpp_source.html">itimer.hpp</a> 第 <a class="el" href="../../db/d24/itimer_8hpp_source.html#l00016">16</a> 行定义.</p>

</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a id="ae0b9a3f6caa6ae2a56bd06898da25ce1" name="ae0b9a3f6caa6ae2a56bd06898da25ce1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae0b9a3f6caa6ae2a56bd06898da25ce1">&#9670;&#160;</a></span>errMsg()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::string iTimer::errMsg </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="#a31bdd3250ca6c5542d0ec156bd82c5ab">emErrCode</a></td>          <td class="paramname"><span class="paramname"><em>e</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../dc/d46/itimer_8cpp_source.html">itimer.cpp</a> 第 <a class="el" href="../../dc/d46/itimer_8cpp_source.html#l00002">2</a> 行定义.</p>
<div class="dynheader">
这是这个函数的调用关系图:</div>
<div class="dyncontent">
<div class="center"><img src="../../d2/d38/structi_timer_ae0b9a3f6caa6ae2a56bd06898da25ce1_icgraph.png" border="0" usemap="#ad2/d38/structi_timer_ae0b9a3f6caa6ae2a56bd06898da25ce1_icgraph" alt=""/></div>
<map name="ad2/d38/structi_timer_ae0b9a3f6caa6ae2a56bd06898da25ce1_icgraph" id="ad2/d38/structi_timer_ae0b9a3f6caa6ae2a56bd06898da25ce1_icgraph">
<area shape="rect" title=" " alt="" coords="203,56,308,83"/>
<area shape="rect" href="../../d9/d91/classlinux_timer.html#abeebd83796551a74702a0660900f7e5e" title=" " alt="" coords="5,5,155,32"/>
<area shape="poly" title=" " alt="" coords="191,54,128,35,130,30,192,48"/>
<area shape="rect" href="../../d9/d91/classlinux_timer.html#a00cfbf6e7956a9ae875d4392313c0f29" title=" " alt="" coords="5,56,155,83"/>
<area shape="poly" title=" " alt="" coords="187,72,155,72,155,67,187,67"/>
<area shape="rect" href="../../d9/d91/classlinux_timer.html#afc0980d8b3243467393d106770d099d9" title=" " alt="" coords="5,107,155,133"/>
<area shape="poly" title=" " alt="" coords="192,90,130,109,128,104,191,85"/>
</map>
</div>

</div>
</div>
<a id="abea86b75a4bcc2399821b799e221b9ce" name="abea86b75a4bcc2399821b799e221b9ce"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abea86b75a4bcc2399821b799e221b9ce">&#9670;&#160;</a></span>IsRuning()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool iTimer::IsRuning </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>判断计时器是否正在运行 </p>

<p>在 <a class="el" href="../../d9/d91/classlinux_timer.html#a64e54112f6cb165dee88a5d0ae8045c0">linuxTimer</a>, <a class="el" href="../../db/d3e/classwheels_1_1_c_timer.html#ad766f6d3012844697d709021ab23bb1b">wheels::CTimer</a> , 以及 <a class="el" href="../../dc/da9/classwin_timer.html#aceb8aba559f06550a0f9246091925410">winTimer</a> 内被实现.</p>

</div>
</div>
<a id="ad51fd07ebb8585928243674cb21e80e0" name="ad51fd07ebb8585928243674cb21e80e0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad51fd07ebb8585928243674cb21e80e0">&#9670;&#160;</a></span>Reset()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="#a31bdd3250ca6c5542d0ec156bd82c5ab">emErrCode</a> iTimer::Reset </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>复位计时，让计时器从零开始计时 </p>

<p>在 <a class="el" href="../../d9/d91/classlinux_timer.html#a5472bac2316d32981b30f6a8b1600e83">linuxTimer</a>, <a class="el" href="../../db/d3e/classwheels_1_1_c_timer.html#a981c7a2959ddebff80bd6f8eb2312a4f">wheels::CTimer</a> , 以及 <a class="el" href="../../dc/da9/classwin_timer.html#a756d1d8625064baaee44224298396633">winTimer</a> 内被实现.</p>

</div>
</div>
<a id="aa51cbfaef39ee9841c24ff65ce720acc" name="aa51cbfaef39ee9841c24ff65ce720acc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa51cbfaef39ee9841c24ff65ce720acc">&#9670;&#160;</a></span>SetOwner()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void iTimer::SetOwner </td>
          <td>(</td>
          <td class="paramtype">std::function&lt; void()&gt;</td>          <td class="paramname"><span class="paramname"><em>fun</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>指定事件响应函数， </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">fun</td><td>，事件响应的函数对象，使用std::bind完成或者直接指定函数对象 </td></tr>
  </table>
  </dd>
</dl>

<p>在 <a class="el" href="../../d9/d91/classlinux_timer.html#a7663f68ea95168f3d72c8e0199c32bed">linuxTimer</a>, <a class="el" href="../../db/d3e/classwheels_1_1_c_timer.html#a503a7fd2e5fdfcd321622f6c34f234e3">wheels::CTimer</a> , 以及 <a class="el" href="../../dc/da9/classwin_timer.html#a20ee41eb7e75beb6f68dfaf4343c87f8">winTimer</a> 内被实现.</p>

</div>
</div>
<a id="a3aaa71906aca3939acf219852b2d36d9" name="a3aaa71906aca3939acf219852b2d36d9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3aaa71906aca3939acf219852b2d36d9">&#9670;&#160;</a></span>setTick()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void iTimer::setTick </td>
          <td>(</td>
          <td class="paramtype">long</td>          <td class="paramname"><span class="paramname"><em>t</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>在 <a class="el" href="../../d9/d91/classlinux_timer.html#a399b8f2aecafb381a836e7f89a3cb865">linuxTimer</a>, <a class="el" href="../../db/d3e/classwheels_1_1_c_timer.html#a0e94a7484f06a6e38c29591182191510">wheels::CTimer</a> , 以及 <a class="el" href="../../dc/da9/classwin_timer.html#a9da570f1136b3a5f7b958077a58a72ae">winTimer</a> 内被实现.</p>

</div>
</div>
<a id="a0bd87be9906e599b0776fc592cf81f9c" name="a0bd87be9906e599b0776fc592cf81f9c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0bd87be9906e599b0776fc592cf81f9c">&#9670;&#160;</a></span>Start()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="#a31bdd3250ca6c5542d0ec156bd82c5ab">emErrCode</a> iTimer::Start </td>
          <td>(</td>
          <td class="paramtype">long</td>          <td class="paramname"><span class="paramname"><em>ms</em></span><span class="paramdefsep"> = </span><span class="paramdefval">-1</span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool</td>          <td class="paramname"><span class="paramname"><em>oneShot</em></span><span class="paramdefsep"> = </span><span class="paramdefval">false</span>&#160;)</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>启动或者重启计时器。 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">ms</td><td>， 计时时长，单位ms，当ms小于0的时候，使用就计时时长启动计时器 </td></tr>
    <tr><td class="paramname">oneShot</td><td>， 是否单次计时，true单次计时，否则连续计时 </td></tr>
  </table>
  </dd>
</dl>

<p>在 <a class="el" href="../../d9/d91/classlinux_timer.html#a93a10e9e8a6ee3079f2c98425ce433aa">linuxTimer</a>, <a class="el" href="../../db/d3e/classwheels_1_1_c_timer.html#a5a4c68739dffae58b731c5e9fcb98b0b">wheels::CTimer</a> , 以及 <a class="el" href="../../dc/da9/classwin_timer.html#a8e3b9ffad7b759f2df399d8d222808cb">winTimer</a> 内被实现.</p>

</div>
</div>
<a id="a38cfdd65a88c39d24e2ddc3ceeebda2e" name="a38cfdd65a88c39d24e2ddc3ceeebda2e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a38cfdd65a88c39d24e2ddc3ceeebda2e">&#9670;&#160;</a></span>Stop()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="#a31bdd3250ca6c5542d0ec156bd82c5ab">emErrCode</a> iTimer::Stop </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>停止计时器 </p>

<p>在 <a class="el" href="../../d9/d91/classlinux_timer.html#a9f8127cc511dc74220398e4ed6758551">linuxTimer</a>, <a class="el" href="../../db/d3e/classwheels_1_1_c_timer.html#a128e8bdb25823a748453e1b2a817ec99">wheels::CTimer</a> , 以及 <a class="el" href="../../dc/da9/classwin_timer.html#a5761b4045da691f1b4be219414eb4d65">winTimer</a> 内被实现.</p>

</div>
</div>
<hr/>该结构体的文档由以下文件生成:<ul>
<li>include/details/<a class="el" href="../../db/d24/itimer_8hpp_source.html">itimer.hpp</a></li>
<li>src/details/<a class="el" href="../../dc/d46/itimer_8cpp_source.html">itimer.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.11.0
</small></address>
</div><!-- doc-content -->
</body>
</html>
